88-level variables, also known as "condition name" variables, each have a name, a value or set of values, and a "parent" variable. Those parent
variables are called "conditional variables".
Each 88-level variable can be seen as a short-cut conditional for testing the value of the parent: IF MY-88
will intrinsically return
true
if the parent value matches MY-88
's value, and false
if it does not.
Thus, testing a conditional variable against a literal value is redundant and confusing. Just use the 88-levels instead.
Noncompliant code example
01 COLOR PIC X
88 YELLOW VALUE 'Y'
88 GREEN VALUE 'G'
88 RED VALUE 'R'
...
IF COLOR = 'G' *> Noncompliant
...
END-IF
Compliant solution
01 COLOR PIC X
88 YELLOW VALUE 'Y'
88 GREEN VALUE 'G'
88 RED VALUE 'R'
...
IF GREEN
...
END-IF